package cn.wolfcode.luowowo.article.mapper;

import cn.wolfcode.luowowo.article.domain.Travel;
import cn.wolfcode.luowowo.article.query.TravelsQuery;
import cn.wolfcode.luowowo.article.vo.TravelPersistenceVo;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface TravelMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Travel record);

    Travel selectByPrimaryKey(Long id);

    List<Travel> selectAll();

    int updateByPrimaryKey(Travel record);

    List selectForList(TravelsQuery qo);

    List<Travel> selectViewNumTop3(Long destId);

    void updateState(@Param("id") Long id, @Param("state") int state, @Param("date") Date date);

    List<Travel> list();

    void updateStatisVo(TravelPersistenceVo spvo);

    List<Travel> selectTravelByTop5(Long sid);


    List<Travel> queryFroList(Long sid);


   int selectForTotal(Long sid);

    Travel queryforTravelByDestId(long destId);

    int selectForReplynum(Long uid);

    int selectForViewnum(Long uid);

    List<Travel> selectTravel(List<Long> travelsIds);
}